#ifndef VARIABLEMONITORBOARD_H
#define VARIABLEMONITORBOARD_H

#include <BAction>
#include <BComboBox>
#include <BTreeWidget>
#include <BGroupBox>
#include <BFloatSpinBox>
#include <BRealSpinBox>
#include <BListWidget>
#include <BMainWindow>

#include "MarkChartView.h"

class MainWindow : public BMainWindow
{
	BOBJECT(MainWindow)
public:
	MainWindow(BWidget* parent = 0);
	~MainWindow();

protected:
	void slotFileListWidgetRightClicked(BListWidget* listWidget, const BValue& value);
	void slotFileListWidgetFramed(BListWidget* listWidget, const BValue& value);
	void slotFileListWidgetKeyPress(BListWidget* listWidget, const BValue& value);
	void slotFileListWidgetSelectionChanged(BListWidget* listWidget, const BValue& value);

	void slotChartViewResized(BObject* object, const BValue& value);
	void slotValueUnitChanged(BObject* object, const BValue& value);

	void slotCleanButtonClicked(BObject* object, const BValue& value);
	void slotLoadButtonClicked(BObject* object, const BValue& value);
	void slotSaveButtonClicked(BObject* object, const BValue& value);

protected:
	virtual void updateEvent(const BEvent& event);

	virtual void showEvent(const BEvent& event);
	virtual void hideEvent(const BEvent& event);

	virtual void styleEvent(const BEvent& event) override;

private:
	BListWidget*		_fileListWidget;

	MarkChartView*		_markChartView;
	BComboBox*			_valueUnitComboBox;

	BButton*			_cleanButton;
	BButton*			_loadButton;
	BButton*			_saveButton;

	BIntArray			_dataBuffer;
};

#endif
